package com.atguigu.yygh.task.job;

import com.atguigu.yygh.mq.MqConst;
import com.atguigu.yygh.mq.RabbitService;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * ClassName: PatientRemindJob
 * Package: com.atguigu.yygh.task.job
 * Description:
 *
 * @Author: cqk
 * @Create: 2023/10/8 - 8:24
 * @Version: v1.0
 */
@Component
public class PatientRemindJob {
    @Autowired
    private RabbitService rabbitService;


    @Scheduled(cron="*/3 * * * * ?")
    public void partTime(){
//        System.out.println(new DateTime().toString("yyyy-MM-dd HH:mm:ss"));
        rabbitService.sendMessage(MqConst.EXCHANGE_DIRECT_TASK,MqConst.ROUTING_TASK_8,"xxx");
    }

}
